#define MAX_BITS 8
unsigned  char rotateLeft(unsigned  char n, unsigned char d)
{
   unsigned char fallOffPortion = n >> (MAX_BITS - d); 
   //printf("\n##%d  %d", fallOffPortion ,n);
   unsigned char rotated = n << d;
   //printf("\n@@@%d  %d", rotated ,n);
   return rotated | fallOffPortion ;
}
 
 
/* Driver program to test above functions */
int main()
{
  char n = 198;
  char d = 4;
  /*printf("\Left Rotation of %d by %d is ", n, d);*/
  printf("\n\n%d", rotateLeft(n, d));
  getchar();
} 